package com.wanmait.community.controller;

import com.auth0.jwt.exceptions.JWTVerificationException;
import com.wanmait.community.util.AjaxResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

public class CommonControllerAdviice {
    @RestControllerAdvice
    public class CommonControllerAdvice {
        @ExceptionHandler(value = JWTVerificationException.class)
        public AjaxResult handleException(JWTVerificationException  exception) {
             return AjaxResult.error(10002,exception.getMessage());
        }


    }

}
